var a = getApp();

Page({
    data: {
        active: 0,
        agency_info: {},
        list: [],
        language: {},
        page: 1,
        last_page: 1
    },
    onLoad: function(a) {
        this.getData();
        var t = wx.getStorageSync("langIndex");
        this.setData({
            language: t.en
        });
    },
    getData: function() {
        var t = this;
        a._getNetWork({
            url: a.getNetAddresss("plugin.love-speed-pool.frontend.statistic.index"),
            success: function(e) {
                0 != e.data.result ? t.setData({
                    agency_info: e.data.data.agency_info || {},
                    list: e.data.data.child_list.data || [],
                    last_page: e.data.data.child_list.last_page
                }) : a.tips(e.data.msg);
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {
        var t = this;
        if (!(this.data.page >= this.data.last_page)) {
            var e = this.data.page + 1;
            a._getNetWork({
                url: a.getNetAddresss("plugin.love-speed-pool.frontend.statistic.index"),
                data: {
                    page: e
                },
                success: function(e) {
                    if (0 != e.data.result) {
                        var s = t.data.list.concat(e.data.data.child_list.data);
                        t.setData({
                            list: s,
                            page: e.data.data.child_list.page,
                            last_page: e.data.data.child_list.last_page
                        });
                    } else a.tips(e.data.msg);
                }
            });
        }
    },
    onShareAppMessage: function() {}
});